package com.rabbit.spring;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 * <p>
 * Author: libingyang
 * Date: 2021-03-16 20:28
 */

@Component
public class WorkCustomer {

    @RabbitListener(queuesToDeclare = @Queue("work"))
    public void revice(String message){
        System.err.println("消费者1"+message);

    }


    @RabbitListener(queuesToDeclare = @Queue("work"))
    public void revice1(String message){
        System.err.println("消费者2"+message);

    }
}
